import {createRouter, createWebHistory} from 'vue-router'

const router = createRouter({
    history: createWebHistory(import.meta.env.BASE_URL),
    routes: [
        // 默认重定向到登录页
        {
            path: "/",
            redirect: "/sign-in"
        },
        {
            path: '/sign-in',
            name: 'signIn',
            component: () => import('../views/SignIn.vue')
        },
        {
            path: '/sign-up',
            name: 'signUp',
            // route level code-splitting
            // this generates a separate chunk (About.[hash].js) for this route
            // which is lazy-loaded when the route is visited.
            component: () => import('../views/SignUp.vue')
        }
    ]
})

export default router
